package com.cwl.pattern.命令模式;

/**
 * @program: pattern
 * @description: 调用者
 * @author: ChenWenLong
 * @create: 2019-07-04 16:01
 **/
public class Invoker {

    private Command command;

    Invoker(Command command) {
        this.command=command;
    }

    public void setCommand(Command command) {
        this.command=command;
    }

    public void call() {
        System.out.println("调用者执行命令command...");
        command.execute();
    }
}
